package com.shihan.sqlSession;

import java.sql.SQLException;
import java.util.List;

public interface SQLSession {

    public <E> List<E> selectList(String statementid,Object... params) throws Exception;

    public <T> T selectOne(String statementid,Object... params) throws Exception;

    public int executeUpdate(String statemendit,Object... params) throws ClassNotFoundException, SQLException, IllegalAccessException, NoSuchFieldException;

    /**
     * 根据传入的 Dao 层接口的 class 类型，
     * 生成对应的 代理类对象，来代替 DaoImpl 实现类.
     * @param mapperClass
     * @param <T>
     * @return
     */
    public <T> T getMapper(Class<?> mapperClass);


}
